package com.guigu.tankai.service.impl;

import com.guigu.liuyunan.mapper.OrderMapper;
import com.guigu.liuyunan.mapper.SetmealMapper;
import com.guigu.liuyunan.pojo.Order;
import com.guigu.tankai.mapper.MemberMapper;
import com.guigu.tankai.mapper.MemberexaminationMapper;
import com.guigu.tankai.pojo.Member;
import com.guigu.tankai.pojo.Memberexamination;
import com.guigu.tankai.service.MemberexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MemberexServiceImpl implements MemberexService {
    @Autowired
    MemberexaminationMapper memb;

    @Autowired
    OrderMapper orderMapper;

    @Autowired
    MemberMapper memberMapper;

    @Autowired
    SetmealMapper setmealMapper;



    @Override
    public int deleteByPrimaryKey(Integer id) {
        return memb.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(Memberexamination record) {
        return memb.insertSelective(record);
    }

    @Override
    public Memberexamination selectByPrimaryKey(Integer id) {
        return memb.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKey(Memberexamination record) {
        return memb.updateByPrimaryKey(record);
    }

    @Autowired
    OrderMapper om;


    @Override
    public int tankaiUp(Order order) {
        Member member = new Member();
        member.setId(order.getMembeid());
        member.setCheckitemzt(1);
        memberMapper.zt(member);
        return om.tankaiUp(order);
    }
}
